package com.gmrz.uap.common;

import com.gmrz.uap.dict.DictConst;
import com.gmrz.uap.dict.DictService;
import com.gmrz.uap.model.Dict;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

import java.util.List;

public class AuthTypeInterceptor implements Interceptor {

    @Override
    public void intercept(Invocation inv) {
        List<Dict> authTypeListForJS = DictService.me.getDictListByDictTypeID(DictConst.DICT_TYPE_STATICS_AUTH_AUTH_TYPE_ID);
        inv.getController().setAttr("authTypeListForJS", authTypeListForJS);
        inv.invoke();
    }
}
